home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magnum One
/
Magnum One (Mid-American Digital) (Disc Manufacturing).iso
/
d21
/
vfos_dv.arc
/
INSTALL.INC
< prev
next >
Wrap
Text File
|
1990-08-09
|
5KB
|
121 lines
subttl Installation routine
page +
;
; VFOS_IBM FOSSIL driver by Bob Hartman (SysOp of 1:132/101).
; Copyright 1988 by Spark Software. ALL RIGHTS RESERVED.
;* all comments with * in them were added by David Page
;* and may not reflect Bob Hartman's intentions
;
Resend Equ $ ;Resident code ends here
my_intro Db 'VFOS_IBM VFOSSIL Compatible Driver '
rev_str db '$Revision: ',curr_fossil+'0','.',curr_maj_rev+'0',curr_min_rev+'0',' $'
crlflf Db 13,10,10,'$'
got_1 Db 13,10,'Another (supposedly) compatible driver has already been loaded!',13,10,'$'
bad_1 Db 13,10,'Bad return from regular FOSSIL when attempting to install VFOSSIL!',13,10,'$'
str2 Db '(C) Copyright 1988 by Bob Hartman and Spark Software, Inc.',13,10,'$'
str3 Db 'Modifications ver A for DESQview by David Page (109/604)',13,10,'$'
start: ;Initialization code
MOV DX,OFFSET my_intro ; print first string
MOV AH,9
INT 21H
MOV DX,OFFSET rev_str ; print first string
INC DX
MOV AH,9
INT 21H
MOV DX,OFFSET crlflf ; print cr's and lf's
MOV AH,9
INT 21H
MOV DX,OFFSET str2 ; print second string
MOV AH,9
INT 21H
MOV DX,OFFSET str3 ; print third string
MOV AH,9
INT 21H
; check if a driver is already present
mov ah,81h ;VFOSSIL application code
mov al,0 ;subfunction 0 to get info
mov di,offset vfos_info ;structure to store info
push es ;save ES
push cs ;put CS into
pop es ;ES
int 14h ;call the function
cmp ax,1954h ; was it a proper return?
je already_there ; yes, so just exit
mov ah,7eh ; install application code
mov al,81h ; VFOSSIL code
mov dx,offset vfos_entry ; offset of entry point (es ok)
int 14h ; initialize it
cmp ax,1954h ; good return?
jne bad_fossil ; no, say it was bad
cmp bh,1 ; was it installed
jne bad_fossil ; no, say it was bad
; make sure the table is properly set up (do our own relocation!)
mov di,offset FUNCTBL ;* setup FUNCTBL addressing
mov ax,cs ;* put current code address in
mov es,ax ;* ES, and starting from
add di,2 ;* 2 bytes into FUNCTBL
mov cx,20 ;* for 20 functions
str_loop:
stosw ;* move CS into the segment
add di,2 ;* part of function address
loop str_loop ;* skipping offset, loop til done
; now set up the base address of the adapter
mov ah,0fh ;* what is video mode function
int 10h ;* call bios to find out
cmp al,7 ;* is it monochrome?
jne env_free ;* if not, go on
mov ax,0b000h ;* if so, change to mono from
mov adapter_base,ax ;* CGA (the default)
; Free our environment memory segment
env_free:
push cs ;* put Code Segment
pop ds ;* into DS, as setup for DOS
mov bx,2ch ;* pointer to environment segment
mov ax,[bx] ;* in PSP, moved to become
mov es,ax ;* segment address to free
mov ah,49h ;* free allocated memory call
int 21h ;* to DOS, requires DOS 2.0
; And finally, terminate but leave resident code
; Use the old Int 27 call for DOS 1.x compatability.
pop es
mov dx,offset resend ;* free up memory used by install
Int 27H ;Use Int 27 for DOS 1.0 Compatability
already_there:
mov dx,offset got_1 ;* message saying we're here already
jmp nogo
bad_fossil:
mov dx,offset bad_1 ;* message saying FOSSIL bad
nogo:
pop es
mov ah,9 ;print string
int 21h
int 20h ;terminate ;* normally, no install
code ends
end vfos_ibm